package com.walker.spring.main;

import com.walker.spring.config.EventConfig;
import com.walker.spring.publisher.DemoPublisher;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author qinmu
 * @create 2017-10-16-22:29
 */
public class EventMain {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(EventConfig.class);
        DemoPublisher publisher = context.getBean(DemoPublisher.class);
        publisher.publish("hello,application context");
        context.close();
    }
}
